<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<title>我的商机</title>
		<link rel="stylesheet" type="text/css" href="../../css/aui-win.min.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/aui-win.css"/>
		<style>
			a {
				text-decoration: none;
			}
			.navBox {
				height: 40px;
			}
			.navBox ul li {
				font-size: 16px;
				line-height: 40px;
				display: inline-block;
				margin-left: 1%;
				list-style: none;
			}
			.selected {
				color: #00ABFD;
				border-bottom: 1px solid #00ABFD;
			}
			.edit {
				position: absolute;
				right: 2.5%;
				color: #0078FF;
			}
			#lgImg {
				height: 120px;
			}
            /*头部样式*/
            body{
                background:#E0E0E0;
            }
            div{
                width:100%;
                /*background:#E0E0E0;*/
                text-align:center;
            }
            span{
                margin-top:200px;
                font-size: 20px;
            }
            #back{
                background: transparent;
            }
			/*设置内容区样式*/
			body {
				min-width: 320px;
			}
            
            /*中间样式开始*/
            .row{
                padding: 10px 1%;
                width: 98%;
                height: 100px;
                border-bottom: 1px solid #7e7e7e;
                /*background: red;*/
            }
            .row img{
                float: left;
                margin-right: 5px;
                width: 100px;
                height: 100px;
            }
            .innerContent{
                float: left;
                /*margin-left: -70px;*/
                /*width: auto;*/
                /*height: auto;*/
                width: 70%;
                height: 100px;
                /*background: green;*/
                overflow: hidden;
            }

            @media screen and (max-width: 374px) {
                .innerContent{width: 65%;}
            }
            .companyInfo{
                width: 100%;
                height: 20px;
                /*background: pink;*/
                overflow: hidden;
                margin-bottom: 3px;
                /*text-overflow: ellipsis;*/
                /*white-space: nowrap;*/
                font-size:18px;
                line-height: 20px;
            }
            .companyInfo img{
                width: 20px;
                height: 20px;
                float: left;
            }
            .companyInfo label{
               float: left;}
            .title{
                display: inline-block;
                font-size: 20px;
                margin:3px 0 7px 0;
                padding: 0;
                float: left;
            }
              .delete_l{
                width: 30%;
                height: 20px;
                line-height: 45px;
                text-align: center;
                color: #999;
                float: right;
                font-size:14px;
               
            }
            .innerContent ul{
                margin-top: 15px;
                list-style: none
            }
            .innerContent li{
                float: left;
                font-size:12px;
                line-height: 24px;
                margin-right: 10px;
            }
            .innerContent ul img{
                width: 24px;
                height: 24px;
            }
            @media screen and (min-width: 322px) and (max-width: 413px) {
                .title{font-size: 16px;}
                .companyInfo{
                    height: 20px;
                    /*background: pink;*/
                    overflow: hidden;
                    margin-bottom: 3px;
                    /*margin:0 0 3px 10px;*/
                    font-size:14px;
                    line-height: 20px;
                }
            }
            @media screen and (max-width: 321px) {
               .row{
                   height: 80px;
               }
                .innerContent{
                    width: 68%;
                    height: 80px;
                }
                .row img{
                    width: 80px;
                    height: 80px;
                }
                .title{font-size: 16px;}
                .companyInfo{
                    height: 20px;
                    /*background: pink;*/
                    overflow: hidden;
                    margin-bottom: 3px;
                    /*margin:0 0 3px 10px;*/
                    font-size:14px;
                    line-height: 20px;
                }
                .companyInfo img{
                    width: 20px;
                    height: 20px;
                    float: left;
                }
                 .innerContent ul{
                    margin-top: 8px;
                }
                
            }
            /*中间主体部分结束*/
		</style>
	</head>
	<body>
    <header class="aui-bar aui-bar-nav aui-bar-yunzo" id="aui-header">
		<a class="aui-btn aui-bar-yunzo aui-pull-left" id="back" onclick="back_go()"> <span class="aui-iconfont aui-icon-left"></span></a>
		<div class="aui-title" id="title">
			我的商机
		</div>
		<a class="aui-iconfont aui-icon-menu aui-pull-right"></a>
	</header>
    <div class="margin_div"></div>
    <div id="buseListDiv"  class="noMsg" >
        <!--<div class="row">-->
        <!--<img  src="../../image/my/company_dummy_logo .png" alt="logo"/>-->
        <!--<div class="innerContent">-->
        <!--<label class="title">优秀商会秘书长如何炼成的？</label>-->
        <!--<p class="companyInfo"><img src="../../image/my/buse_person_icon.png" alt="logo"/>-->
            <!--<label class="perName">欧阳锋</label><label class="perZhiwei">&nbsp;(四川省商协会长)</label>-->
        <!--</p>-->
        <!--<ul>-->
        <!--<li>8-12</li>-->
        <!--<li>15:30</li>-->
        <!--<li><img src="../../image/my/buse_comm.png" alt="logo"/>188</li>-->
        <!--</ul>-->
        <!--</div>-->
        <!--</div>-->
    </div>
    <!--加载loading功能-->
    <div id="loadIng_startStop" style="width: 100%;height: 100%;position: absolute;z-index: 1000;display: none;">
    	<div class="div_loding_img">
		数据加载中
		</div>
    </div>
	</body>
	<script type="text/javascript" src="../../script/jquery-1.10.2.min.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>

    <script>
        /*ty-2015-11-23*/
        /*返回上级页面*/
        $("#back").attr("href","mine.html");

        /*loading加载转圈*/
        sTart_Stop();
        /*获取我的订单列表*/
        //        var baseDatas = basedata('myinfo');
        var pagesize=5;
//        var type =1;
        var bodyParam={
//            type:type,
            pagesize:pagesize,
            mid:$mid,
            groupid:$groupid,
            did:initdata.get('mybusess')
        };
        ajaxcocRequest("../../../api/group/getmemberbusinessinfolist","POST",bodyParam,function(msg){
            console.log(msg);
            var str="";
            if(msg.code==100){
                if(msg.data.length==0){
                	$("#buseListDiv").html("<div style='width:20%;margin:40px 0 0 40%;'><img src='../../image/gantan.png' style='width:100%;'></div><p style='width:100%;text-align:center;margin-top:30px;color:#999;font-size:18px;'>您还未发布商机！</p>")
                }else{
                    
                    for(var j=0;j<msg.data.length;j++){
                        str += "<div class='row' id='"+msg.data[j].n0+"'>";
                        str += "<img  class='logo' src='"+msg.data[j].n1+"'/>";
                        str += "<div class='innerContent'>";
                        str += "<label class='title'>"+msg.data[j].n2+"</label>";
                        str += "<p class='companyInfo'><img src='../../image/my/buse_person_icon.png' alt='logo'/>";
                        str += "<label class='perName'>"+msg.data[j].n4+"</label><label class='perZhiwei'>&nbsp;("+msg.data[j].n6+")</label>";
                        str += "</p>"+"<div class='delete_l' onclick='delete_l(\"" + msg.data[j].n0 + "\")'>"+'<p>删除</p></div>'+"<ul>";
                        str += "<li>"+msg.data[j].n3+"</li>";
                        str +="</ul></div></div>";

                    }
                    $("#buseListDiv").html(str);
                    $("img").error(function(){
    					$(this).attr("src","../../image/home/busess/yunzo_def.png")
    				});
                }
            }else{
            	$("body").append('<div class="wuwang"><img src="../../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')
            }
        });
        function delete_l(bid)
        {
        	 if(confirm( '确定是否真的删除信息?'))
 			{
 				var bodyparam1={
 					mid:$mid,
 					groupid:$groupid,
 					did:66666,
 					bid:bid
 				};
 				ajaxcocRequest("../../../api/group/delbusinfobybid","POST",bodyparam1,function(msg){
 					if(msg.code==100){
 						alert("删除成功！")
 						$('#'+bid).css("display","none");
 					}
 					else{
 						$("body").append('<div class="wuwang"><img src="../../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')
 					}
 					});
 			}
        	
        }
    </script>
</html>